﻿using BCCommon.Enums;
using System;
using System.ComponentModel.DataAnnotations;
using BCCommon.Extensions;

namespace BCDto.Website.User
{
    /// <summary>
    /// 用户信息模型
    /// </summary>
    public class UserDto
    {
        /// <summary>
        /// 用户Id
        /// </summary>	
        [Display(Name = "用户Id")]
        public long UserId { get; set; }

        /// <summary>
        /// 手机号
        /// </summary>	
        [Display(Name = "用户手机号")]
        public string Phone { get; set; }

        /// <summary>
        /// 用户姓名
        /// </summary>
        [Display(Name = "用户姓名")]
        public string UserName { get; set; }

        /// <summary>
        /// 注册时间
        /// </summary>	
        [Display(Name = "注册时间")]
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 最后登录时间
        /// </summary>	
        [Display(Name = "最后登录时间")]
        public DateTime LastLoginTime { get; set; }

        /// <summary>
        /// 当前登录时间
        /// </summary>	
        [Display(Name = "当前登录时间")]
        public DateTime CurrentlyLoginTime { get; set; }
        /// <summary>
        /// 登录IP地址
        /// </summary>
        [Display(Name = "登录IP地址")]
        public string LogonIp { get; set; }

        /// <summary>
        /// 登录IP转换地址
        /// </summary>
        [Display(Name = "登录IP转换地址")]
        public string AddressIp { get; set; }
        /// <summary>
        /// 身份证号
        /// </summary>	
        [Display(Name = "身份证号")]
        public string IdentityCardNo { get; set; }

        /// <summary>
        /// 用户积分
        /// </summary>	
        [Display(Name = "用户积分")]
        public int UserIntegrals { get; set; }

        /// <summary>
        /// 头像
        /// </summary>	
        [Display(Name = "头像")]
        public string Avatar { get; set; }

        /// <summary>
        /// 账号状态
        /// </summary>
        [Display(Name = "账号状态")]
        public AccountStatus AccountStatus { get; set; }
        /// <summary>
        /// 账号状态中文
        /// </summary>
        [Display(Name = "账号状态")]
        public string AccountStatusStr { get { return AccountStatus.GetDescriptionString(); } }

        /// <summary>
        /// 唯一码
        /// </summary>
        [Display(Name = "唯一码")]
        public string UniqueCode { get; set; }
        /// <summary>
        /// 合伙人Id
        /// </summary>
        [Display(Name = "合伙人Id")]
        public long? PartnerId { get; set; }
        /// <summary>
        /// 合伙人姓名
        /// </summary>
        [Display(Name = "合伙人姓名")]
        public string PartnerName { get; set; }
        /// <summary>
        /// 验证码
        /// </summary>
        [Display(Name = "验证码")]
        public string PassCode { get; set; }

        /// <summary>
        /// 验证码过期时间
        /// </summary>
        [Display(Name = "验证码过期时间")]
        public DateTime? PassExpirationTime { get; set; }
        /// <summary>
        /// 用户评分
        /// </summary>
        [Display(Name = "用户评分")]
        public decimal? EvaluationScore { get; set; }
        /// <summary>
        /// 用户账号角色
        /// </summary>
        [Display(Name = "用户账号角色")]
        public RoleType? Role { get; set; }
        /// <summary>
        /// 用户账号角色中文
        /// </summary>
        [Display(Name = "用户账号角色中文")]
        public string RoleStr
        {
            get
            {
                return this.Role == null ? null : this.Role.GetDisplayString();
            }
        }
        /// <summary>
        /// 省份Id
        /// </summary>
        [Display(Name = "省份Id")]
        public string ProvinceId { get; set; }
        /// <summary>
        /// 省份编码
        /// </summary>
        [Display(Name = "省份编码")]
        public string ProvinceCode { get; set; }
        /// <summary>
        /// 省份名称
        /// </summary>
        [Display(Name = "省份名称")]
        public string ProvinceName { get; set; }
        /// <summary>
        /// 市Id
        /// </summary>
        [Display(Name = "市Id")]
        public string CityId { get; set; }
        /// <summary>
        /// 市编码
        /// </summary>
        [Display(Name = "市编码")]
        public string CityCode { get; set; }
        /// <summary>
        /// 市名称
        /// </summary>
        [Display(Name = "市名称")]
        public string CityName { get; set; }
        /// <summary>
        /// 区县Id
        /// </summary>
        [Display(Name = "区县Id")]
        public string CountyId { get; set; }
        /// <summary>
        /// 区县编码
        /// </summary>
        [Display(Name = "区县编码")]
        public string CountyCode { get; set; }
        /// <summary>
        /// 区县名称
        /// </summary>
        [Display(Name = "区县名称")]
        public string CountyName { get; set; }

        /// <summary>
        /// 微信UnionId
        /// </summary>
        [Display(Name = "微信UnionId")]
        public string UnionId { get; set; }
        /// <summary>
        /// VIP用户
        /// </summary>
        [Display(Name = "VIP用户")]
        public bool IsVip { get; set; }
        /// <summary>
        /// 企业用户
        /// </summary>
        [Display(Name = "企业用户")]
        public bool IsEnterprise { get; set; }
        /// <summary>
        /// 公司名称
        /// </summary>
        [Display(Name = "公司名称")]
        public string CompanyName { get; set; }
        /// <summary>
        /// 用户评级
        /// </summary>
        [Display(Name = "用户评级")]
        public GradeType UserLevel { get; set; }
        /// <summary>
        /// 是否领取红包
        /// </summary>
        [Display(Name = "是否领取红包")]
        public bool IsReceiveRedPacket { get; set; }
        /// <summary>
        /// 真实姓名
        /// </summary>
        public string RealName { get; set; }
        /// <summary>
        /// 实名认证状态
        /// </summary>
        public RealNameVerifiesStatus RealNameVerifiesStatus { get; set; }
        /// <summary>
        /// 实名认证状态
        /// </summary>
        public string RealNameVerifiesStatusStr { get { return this.RealNameVerifiesStatus.GetDescriptionString(); } }
        /// <summary>
        /// 实名认证拒绝原因
        /// </summary>
        public string RealNameVerifiesRefuse { get; set; }
        /// <summary>
        /// 身份证图片地址
        /// </summary>
        public string IdentityCardPath { get; set; }
        /// <summary>
        /// 身份证背面图片地址
        /// </summary>
        public string IdentityCardBackPath { get; set; }
        /// <summary>
        /// 审核时间
        /// </summary>
        public DateTime? ApproveTime { get; set; }
        /// <summary>
        /// 审核人名称
        /// </summary>
        public string Approver { get; set; }
        /// <summary>
        /// 审核人Id
        /// </summary>
        public long? ApproverId { get; set; }
        /// <summary>
        /// 父级Id
        /// </summary>
        public long ParentId { get; set; }
    }
}
